<template>
  <div class="app-container">
  <el-card class="box-card">
      <el-form ref="form" :model="form">
        <el-descriptions title="个人基本信息" style="text-align: center" :column="3" border>
          <el-descriptions-item label="姓名" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{form.username }}
          </el-descriptions-item>
          <el-descriptions-item label="证件编号" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.certificateId }}
          </el-descriptions-item>
          <el-descriptions-item label="身份证号" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.idNumber  }}
          </el-descriptions-item>

          <el-descriptions-item label="部门" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">{{
            form.dept.deptName}}
          </el-descriptions-item>
          <el-descriptions-item label="单位" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.department }}
          </el-descriptions-item>
          <el-descriptions-item label="电话" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.phone }}
          </el-descriptions-item>

        </el-descriptions>
        <br/>
        <el-descriptions title="设备基本信息" :column="3" border>

          <el-descriptions-item label="类型" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.equipType }}
          </el-descriptions-item>

          <el-descriptions-item label="来源" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.equipSource }}
          </el-descriptions-item>

          <el-descriptions-item label="编号" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.serialNumber }}
          </el-descriptions-item>
          <el-descriptions-item label="M级" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle">
            <dict-tag :options="dict.type.yh_security" :value="form.equipSecurity" style = "float:left;"/>
          </el-descriptions-item>


          <el-descriptions-item label="启用时间" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.activeTime }}
          </el-descriptions-item>

          <el-descriptions-item label="硬件编码" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.hardwareCode }}
          </el-descriptions-item>
          <el-descriptions-item label="硬盘序列号" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.identificationOfHardDisk }}
          </el-descriptions-item>
          <el-descriptions-item label="BM防护系统情况" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.installation }}
          </el-descriptions-item>
          <el-descriptions-item label="主要通途" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">{{
            form.mainThoroughfare}}
          </el-descriptions-item>
          <el-descriptions-item label="承办人" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">{{
            form.undertaker}}
          </el-descriptions-item>
          <el-descriptions-item label="日期" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.changeDate }}
          </el-descriptions-item>
          <el-descriptions-item label="品牌类型" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.brandType }}
          </el-descriptions-item>

        </el-descriptions>
        <br/>

        <el-descriptions title="设备责任人信息" :column="3" border>
          <el-descriptions-item label="责任人" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.dutyOfficer }}
          </el-descriptions-item>

          <el-descriptions-item label="责任开始时间" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.dutyStartTime }}
          </el-descriptions-item>

          <el-descriptions-item label="责任结束时间" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.dutyEndTime }}
          </el-descriptions-item>

          <el-descriptions-item label="审批领导(责任人变更登记)" label-class-name="my-label" :span="3" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.changeLeadership }}
          </el-descriptions-item>
          <el-descriptions-item label="审批领导建议" label-class-name="my-label" :span="3" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.leadershipSuggestions }}
          </el-descriptions-item>
          <el-descriptions-item label="责任人意见" label-class-name="my-label" :span="3" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.dutyOfficerOpinion }}
          </el-descriptions-item>
        </el-descriptions>
        <br/>


          <el-descriptions title="设备维修信息" :column="3" border>
          <el-descriptions-item label="故障原因" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.faultCause}}
          </el-descriptions-item>

          <el-descriptions-item label="报修人" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.repairMan }}
          </el-descriptions-item>

          <el-descriptions-item label="处理结果" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.handlingResult }}
          </el-descriptions-item>

            <el-descriptions-item label="存放地点" label-class-name="my-label" :span="1.5" :contentStyle='contentStyle' :labelStyle="labelStyle">
              {{ form.storagePlace }}
            </el-descriptions-item>

          <el-descriptions-item label="经办人" label-class-name="my-label" :span="1.5" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{  form.operator }}
          </el-descriptions-item>

            <el-descriptions-item label="审批领导(故障维修登记)" label-class-name="my-label" :span="3" :contentStyle='contentStyle' :labelStyle="labelStyle">
              {{  form.maintainLeadership }}
            </el-descriptions-item>
          </el-descriptions>
        <br/>


        <el-descriptions title="设备维修信息" :column="3" border>

          <el-descriptions-item label="报废日期" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.retirementTime }}
          </el-descriptions-item>

          <el-descriptions-item label="管理人" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.custodian }}
          </el-descriptions-item>

          <el-descriptions-item label="报废原因" label-class-name="my-label" :span="3" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.discardReason }}
          </el-descriptions-item>




          <el-descriptions-item label="送销日期" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{  form.sendDate }}
          </el-descriptions-item>


          <el-descriptions-item label="送销地点" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.sendLocation }}
          </el-descriptions-item>



          <el-descriptions-item label="送销人" label-class-name="my-label" :span="1" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.sendPeople }}
          </el-descriptions-item>

          <el-descriptions-item label="监销人" label-class-name="my-label" :span="3" :contentStyle='contentStyle' :labelStyle="labelStyle">
            {{ form.salePeople }}
          </el-descriptions-item>









        </el-descriptions>
      </el-form>
<br/>
      <div style="float:right; margin-bottom: 15px;">

        <el-button @click="viewCancel">返 回</el-button>
      </div>
  </el-card>
  </div>
</template>

<style>
  .img-box1 {
    white-space: pre-wrap;
    width: 90%;

    position: center;
    margin:20px auto;
  }
  .img-box1 img {
    width: 70%;

    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .imgpre{
    width:200px;
    height: 100px;


  }
  .ifr{
    width: 70%;
    height: 700px;

    position: relative;
    left: 50%;
    transform: translateX(-50% );
  }


  .input_text input.el-input__inner {
    border: none
  }

  input:disabled{

    background-color: #F5F5F5;

    color:#F5F5F5;
  }

</style>
<script>


  import { getToken } from "@/utils/auth";
  import { listArchives, getArchives, delArchives, addArchives, updateArchives } from "@/api/module/ls/archives";
  import {treeselect} from "@/api/system/dept";
  import Treeselect from "@riophae/vue-treeselect";
  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  export default {
    name: "ArchivesDetail",
    components: {

    },
    dicts: ['yh_security',
      'yh_deptid'],

    data() {
      return {
        contentStyle: {
          'width': '180px',
        },
        //label样式
        labelStyle: {
          'width': '140px',
          'color': '#000000',
          'text-align': 'right',
        },
        form:{
          username: null,
          certificateId: null,
          idNumber: null,
          deptid: null,
          department: null,
          undertaker: null,
          phone: null,
          equipType: null,
          equipSource: null,
          serialNumber: null,
          equipSecurity: null,
          activeTime: null,
          brandType: null,
          hardwareCode: null,
          identificationOfHardDisk: null,
          installation: null,
          mainThoroughfare: null,
          note: null,
          sequenceNumber: null,
          dutyOfficer: null,
          dutyStartendTime: null,
          changeLeadership: null,
          changeDate: null,
          faultCause: null,
          repairMan: null,
          handlingResult: null,
          operator: null,
          maintainLeadership: null,
          discardReason: null,
          retirementTime: null,
          dutyOfficerOpinion: null,
          leadershipSuggestions: null,
          storagePlace: null,
          custodian: null,
          sendLocation: null,
          sendDate: null,
          sendPeople: null,
          salePeople: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null,
          remark: null,
          note1: null,
          note2: null,
          note3: null,
          note4: null,
          note5: null,
          note6: null,
          note7: null,
          note8: null,
          note9: null,
          note10: null
        },
        // 选中选项卡的 name
        //activeName: "columnInfo",

        // 表格的高度
        tableHeight: document.documentElement.scrollHeight - 245 + "px",
        // 表信息
        tables: [],
        // 表列信息
        columns: [],
        // 字典信息
        dictOptions: [],
        // 菜单信息
        menus: [],
        // 表详细信息
        info: {note1:"",
          note2:""},
      // 查询参数
      queryParams: {
        pageNum: 1,
          pageSize: 10,
          title: undefined,
          operName: undefined,
          businessType: undefined,
          status: undefined
      }
      };
    },
    created() {

      const id = this.$route.query.id;
      if (id) {
        // 获取表详细信息

        getArchives(id).then(res => {

          this.form = res.data;

        });

      }

    },
    methods: {


      /** 关闭按钮 */
      viewCancel() {
        const id = this.$route.query.id;
        getArchives(id).then(response => {
          this.form = response.data;

        });
        const obj = { path: "/jiben/lsarchives", query: {id} };
        this.$tab.closeOpenPage(obj);
      }
    },

  };
</script>






